#include "flyflatcutting.h"

FlyFlatCutting::FlyFlatCutting()
{
    //添加各种参数到列表中
    initRootParasList();
    initRootHMIConfigurationList(m_allParasList);//超级用户界面配置
    initPatternsParasList();
    initSoftwareParasList(m_allParasList);
    initTimeParasList(m_allParasList);
    initMcParasList();
    initWkParasList();

    //初始化控制动作列表
    initOutCtrlList();

    //初始化快捷功能列表
    initShortCutList();

    //初始化辅助功能列表
    initAssistList();

    //初始化文件设置功能列表
    initFileSetList();

    //参数分类功能
    initParaSetList();

    //初始化传感器列表
    initSensorList();

    //初始化错误代码和状态列表
    initErrorCodeAndStateList();

    //初始化九宫格
    initNinebtn1234();

    //加载右上角信息
    initFileInfoLabel();
}

FlyFlatCutting::~FlyFlatCutting()
{

}

void FlyFlatCutting::initNinebtn1234()
{
    m_nineBtn.insert(1,NineItem(FUN_ALLTOZERO,"buttonAllToZero"));//全部归零
    m_nineBtn.insert(2,NineItem(FUN_FLAT_SETANCHORPOINT,"buttonSetEmbPoint"));//定定位点
    m_nineBtn.insert(3,NineItem(FUN_PROCESSRESET,"buttonProcessReset"));//流程复位
    m_nineBtn.insert(4,NineItem(FUN_SIMULATED_STATUS,"buttonSimulatedStatus"));// 模拟工作状态
}

void FlyFlatCutting::initFileInfoLabel()
{
    m_fileInfo.append(FileName);//文件名
    //    m_fileInfo.append(Index);
    m_fileInfo.append(Schedule);//进度
    m_fileInfo.append(BeginPoint);//起始点
    m_fileInfo.append(Range);//范围
    m_fileInfo.append(Position);//位置
    m_fileInfo.append(Production);//产量
}

//文件参数
void FlyFlatCutting::initPatternsParasList()
{
    QTextCodec *cod = QTextCodec::codecForLocale();

    // 拐点转角判断度数
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_PATTERN,
                                        PATTERNPARA_SORT_PLT ,
                                        CUT_CRUTCH_ANG, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Judgment degree of turning point and angle"),
                                        60, 0, 180, 60, 0, cod->toUnicode("°"), tr(""),
                                        tr(""), 0, 0,0x0001, operate));

    // 分割数据步长,单位0.01mm (0.1~1cm)
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_PATTERN,
                                        PATTERNPARA_SORT_PLT ,
                                        CUT_LINE_STP, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Split data step size"),
                                        100, 100, 1000, 100, 2, "mm", tr(""),
                                        tr(""), 0, 0,0x0002, operate));

    // X向可切割长度,单位0.01mm (1000.00~10000.00)
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_PATTERN,
                                        PATTERNPARA_SORT_PLT ,
                                        CUT_X_LENGH, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("X-direction cutting length"),
                                        500000, 100000, 1000000, 500000, 2, "mm", tr(""),
                                        tr(""), 0, 0,0x0003, operate));

    // 切割两端补偿,单位0.01mm (0.00~100.00)
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_PATTERN,
                                        PATTERNPARA_SORT_PLT ,
                                        CUT_RNF_COMP, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Compensation for cutting both ends"),
                                        1000, 0, 10000, 1000, 2, "mm", tr(""),
                                        tr(""), 0, 0,0x0004, operate));

    //// 切割垂直补偿,单位0.01mm (0.00~100.00)
    //m_allParasList.append(makeAParaItem(0,
    //                                    PARA_TYPE_PATTERN,
    //                                    PATTERNPARA_SORT_PLT ,
    //                                    CUT_Vert_COMP, 0, 0, PARA_VALUE_TYPE_INT,
    //                                    tr("Vertical compensation for cutting"),//切割垂直补偿
    //                                    1000, 0, 10000, 1000, 2, "mm", tr(""),
    //                                    tr(""), 0, 0,0x0005, operate));

    //是否启用画笔
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_PATTERN,
                                        PATTERNPARA_SORT_PLT ,
                                        CUT_ENABLE_BRUSH, 0, 0, PARA_VALUE_TYPE_SW,
                                        tr("Enable brushes"),
                                        1, 0, 1, 1, 0, "", tr(""),
                                        tr(""), 0, 0,0x0006, operate));

    //是否启用重叠消除
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_PATTERN,
                                        PATTERNPARA_SORT_PLT ,
                                        CUT_ENABLE_OR, 0, 0, PARA_VALUE_TYPE_SW,
                                        tr("Enable Overlap Removal"),
                                        1, 0, 1, 1, 0, "", tr(""),
                                        tr(""), 0, 0,0x0007, operate));
    //是否启用边界消除
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_PATTERN,
                                        PATTERNPARA_SORT_PLT ,
                                        CUT_ENABLE_DELEDGE, 0, 0, PARA_VALUE_TYPE_SW,
                                        tr("Enable Boundary Elimination"),
                                        1, 0, 1, 1, 0, "", tr(""),
                                        tr(""), 0, 0,0x0008, operate));
    //边界消除误差
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_PATTERN,
                                        PATTERNPARA_SORT_PLT ,
                                        CUT_DELEDGE_VALUE, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Boundary Elimination Value"),
                                        100, 100, 2000, 1000, 2, "mm", tr(""),
                                        tr(""), 0, 0,0x0009, operate));
    //重叠消除误差
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_PATTERN,
                                        PATTERNPARA_SORT_PLT ,
                                        CUT_OR_VALUE, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Overlap Removal Value"),
                                        100, 100, 2000, 100, 2, "mm", tr(""),
                                        tr(""), 0, 0,0x0009, operate));
}

//主控机器参数
void FlyFlatCutting::initMcParasList()
{
    QTextCodec *cod = QTextCodec::codecForLocale();
    // 刀座1安装刀类型
    //0,无 1,圆刀 2,震刀 3,铣刀 4,偏心刀1 5,偏心刀2 6,画笔 7,尖刀 8,钻孔 9,压轮
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_SETTING,
                                        10, 0, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Knife holder 1 installation knife type"),//刀座1安装刀类型
                                        0, 0, 9, 0, 0, tr(""), tr(""),
                                        //无:0;圆刀:1;震刀:2;
                                        //                                        tr("Null:0;Round knife:1;Shockknife:2;milling cutter:3;Eccentric knife 1:4;"
                                        //                                           "Eccentric knife 2:5;brush:6;Sharp knife:7;drill hole:8;Pressure wheel:9"),
                                        tr("Null:0;Round knife:1;Shockknife:2"),
                                        0, 0, 0x0001, operate));

    //     刀座2安装刀类型
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_SETTING,
                                        11, 0, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Knife holder 2 installation knife type"),//刀座2安装刀类型
                                        0, 0, 9, 0, 0, tr(""), tr(""),
                                        //无:0;圆刀:1;震刀:2;铣刀:3;偏心刀1:4;偏心刀2:5;画笔:6;尖刀:7;钻孔:8;压轮:9
                                        //                                        tr("Null:0;Round knife:1;Shockknife:2;milling cutter:3;Eccentric knife 1:4;"
                                        //                                           "Eccentric knife 2:5;brush:6;Sharp knife:7;drill hole:8;Pressure wheel:9"),
                                        tr("Null:0;Round knife:1;Shockknife:2"),
                                        0, 0, 0x0001, operate));

    //     刀座3安装刀类型
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_SETTING,
                                        12, 0, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Knife holder 3 installation knife type"),//刀座3安装刀类型
                                        0, 0, 9, 0, 0, tr(""), tr(""),
                                        //无:0;圆刀:1;震刀:2;铣刀:3;偏心刀1:4;偏心刀2:5;画笔:6;尖刀:7;钻孔:8;压轮:9
                                        //                                        tr("Null:0;Round knife:1;Shockknife:2;milling cutter:3;Eccentric knife 1:4;"
                                        //                                           "Eccentric knife 2:5;brush:6;Sharp knife:7;drill hole:8;Pressure wheel:9"),
                                        tr("Null:0;Round knife:1;Shockknife:2"),
                                        0, 0, 0x0001, root));

    //13
    // X向格子数,范围0-24
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_DETECT,
                                        13, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Number of X-direction grids"),//X向格子数
                                        0, 0, 24, 0, 0, tr(""), tr(""),
                                        tr(""),
                                        0, 0, 0x0001, operate));

    //Y向格子数,范围0-19
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_DETECT,
                                        14, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Number of Y-direction grids"),//Y向格子数
                                        0, 0, 19, 0, 0, tr(""), tr(""),
                                        tr(""),
                                        0, 0, 0x0001, operate));

    // X向采集长度,单位mm,范围-5000-5000
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_DETECT,
                                        15, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("X-direction acquisition length"),//X向采集长度
                                        0, -5000, 5000, 0, 0, "mm", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, operate));

    // Y向采集长度,单位mm,范围-5000-5000
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_DETECT,
                                        16, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Y-direction acquisition length"),//Y向采集长度
                                        0, -5000, 5000, 0, 0, "mm", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, operate));

    // X向采集起始位置,单位mm,范围-5000-5000
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_DETECT,
                                        17, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Starting position of X-direction collection"),//X向采集起始位置
                                        0, -5000, 5000, 0, 0, "mm", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, operate));

    // Y向采集起始位置,单位mm,范围-5000-5000
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_DETECT,
                                        18, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Starting position of Y-direction collection"),//Y向采集起始位置
                                        0, -5000, 5000, 0, 0, "mm", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, operate));

    // X框传感器坐标,单位 0.01mm,范围-500000-500000
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_POSITION,
                                        20, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("X-box sensor coordinates"),//X框传感器坐标
                                        0, -500000, 500000, 0, 2, "mm", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, operate));

    // Y框传感器坐标,单位 0.01mm,范围-500000-500000
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_POSITION,
                                        21, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Y-box sensor coordinates"),//Y框传感器坐标
                                        0, -500000, 500000, 0, 2, "mm", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, operate));

    // 刀座1升降传感器高度,单位0.01mm,范围-100-10000
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_POSITION,
                                        22, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Knife holder 1 lifting sensor height"),//刀座1升降传感器高度
                                        0, -100, 10000, 0, 2, "mm", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, operate));
    // 刀座2升降传感器高度,单位0.01mm,范围-100-10000
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_POSITION,
                                        23, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Knife holder 2 lifting sensor height"),//刀座2升降传感器高度
                                        0, -100, 10000, 0, 2, "mm", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, operate));
    // 刀座3升降传感器高度,单位0.01mm,范围-100-10000
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_POSITION,
                                        24, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Knife holder 3 lifting sensor height"),//刀座3升降传感器高度
                                        0, -100, 10000, 0, 2, "mm", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, root));

    // 25
    // 刀座1旋转传感器角度,单位0.01度,范围0-36000
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_POSITION,
                                        25, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Knife holder 1 rotation sensor angle"),//刀座1旋转传感器角度
                                        0, 0, 36000, 0, 2, cod->toUnicode("°"), tr(""),
                                        tr(""),
                                        0, 0, 0x0001, operate));

    // 刀座1旋转找零补偿,单位0.01度,范围-1000-1000
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_POSITION,
                                        26, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Knife holder 1 rotation zero compensation"),//刀座1旋转找零补偿
                                        0, -36000, 36000, 0, 2, cod->toUnicode("°"), tr(""),
                                        tr(""),
                                        0, 0, 0x0001, operate));

    // 刀座2旋转传感器角度,单位0.01度,范围0-36000
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_POSITION,
                                        27, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Knife holder 2 rotation sensor angle"),//刀座2旋转传感器角度
                                        0, 0, 36000, 0, 2, cod->toUnicode("°"), tr(""),
                                        tr(""),
                                        0, 0, 0x0001, operate));

    // 刀座2旋转找零补偿,单位0.01度,范围-1000-1000
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_POSITION,
                                        28, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Knife holder 2 rotation zero compensation"),//刀座2旋转找零补偿
                                        0, -36000, 36000, 0, 2, cod->toUnicode("°"), tr(""),
                                        tr(""),
                                        0, 0, 0x0001, operate));

    // 刀座3旋转传感器角度,单位0.01度,范围0-36000
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_POSITION,
                                        29, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Knife holder 3 rotation sensor angle"),//刀座3旋转传感器角度
                                        0, 0, 36000, 0, 2, cod->toUnicode("°"), tr(""),
                                        tr(""),
                                        0, 0, 0x0001, root));

    // 刀座3旋转找零补偿,单位0.01度,范围-1000-1000
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_ACTION,
                                        30, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Knife holder 3 rotation zero compensation"),//刀座3旋转找零补偿
                                        0, -36000, 36000, 0, 2, cod->toUnicode("°"), tr(""),
                                        tr(""),
                                        0, 0, 0x0001, root));


    // 40
    // 可移动区域(X-), 范围 -2147483648--2147483647，单位0.01mm
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_POSITION,
                                        40, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Movable area (X -)"),//可移动区域(X-)
                                        0, S32_MIN, S32_MAX, 0, 2, "mm", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, operate));

    // 可移动区域(X+), 范围 -2147483648--2147483647，单位0.01mm
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_POSITION,
                                        41, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Movable area (X +)"),//可移动区域(X+)
                                        0, S32_MIN, S32_MAX, 0, 2, "mm", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, operate));

    // 可移动区域(Y-), 范围 -2147483648--2147483647，单位0.01mm
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_POSITION,
                                        42, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Movable area (Y-)"),//可移动区域(Y-)
                                        0, S32_MIN, S32_MAX, 0, 2, "mm", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, operate));

    // 可移动区域(Y+), 范围 -2147483648--2147483647，单位0.01mm
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_POSITION,
                                        43, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Movable area (Y+)"),//可移动区域(Y+)
                                        0, S32_MIN, S32_MAX, 0, 2, "mm", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, operate));

    // x可切割区域负边界(X-), 范围 -2147483648--2147483647，单位0.01mm
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_POSITION,
                                        44, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Negative boundary of X cuttable region(X-)"),//x可切割区域负边界(X-)
                                        0, S32_MIN, S32_MAX, 0, 2, "mm", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, operate));
    // x可切割区域正边界(X+), 范围 -2147483648--2147483647，单位0.01mm
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_POSITION,
                                        45, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Positive boundary of the X cutting region(X+)"),//x可切割区域正边界(X+)
                                        0, S32_MIN, S32_MAX, 0, 2, "mm", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, operate));
    // y可切割区域正边界(Y-), 范围 -2147483648--2147483647，单位0.01mm
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_POSITION,
                                        46, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Negative boundary of Y cuttable region(Y-)"),//y可切割区域负边界(Y-)
                                        0, S32_MIN, S32_MAX, 0, 2, "mm", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, operate));
    // y可切割区域正边界(Y+), 范围 -2147483648--2147483647，单位0.01mm
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_POSITION,
                                        47, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Positive boundary of the Y cutting region(Y+)"),//y可切割区域正边界(Y+)
                                        0, S32_MIN, S32_MAX, 0, 2, "mm", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, operate));


    //画笔相对位置X,单位0.01mm
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_POSITION,
                                        64, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Brush relative position X"),//画笔相对位置X
                                        0, S32_MIN, S32_MAX, 0, 2, "mm", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, operate));

    //画笔相对位置Y,单位0.01mm
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_POSITION,
                                        65, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Brush relative position Y"),//画笔相对位置Y
                                        0, S32_MIN, S32_MAX, 0, 2, "mm", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, operate));

    //66
    // 刀座1相对位置X,单位0.01mm
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_POSITION,
                                        66, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Knife holder 1 relative position X"),//刀座1相对位置X
                                        0, S32_MIN, S32_MAX, 0, 2, "mm", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, operate));

    // 刀座1相对位置Y,单位0.01mm
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_POSITION,
                                        67, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Knife holder 1 relative position Y"),//刀座1相对位置Y
                                        0, S32_MIN, S32_MAX, 0, 2, "mm", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, operate));
    // 刀座2相对位置X,单位0.01mm
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_POSITION,
                                        68, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Knife holder 2 relative position X"),//刀座2相对位置X
                                        0, S32_MIN, S32_MAX, 0, 2, "mm", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, operate));
    // 刀座2相对位置Y,单位0.01mm
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_POSITION,
                                        69, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Knife holder 2 relative position Y"),//刀座2相对位置Y
                                        0, S32_MIN, S32_MAX, 0, 2, "mm", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, operate));

    // 刀座1升降上限,单位0.01mm,范围-100-10000
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_POSITION,
                                        80, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Knife holder 1 lifting upper limit"),//刀座1升降上限
                                        0, -100, 10000, 0, 2, "mm", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, root));

    // 刀座1升降下限,单位0.01mm,范围-100-10000
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_POSITION,
                                        81, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Knife holder 1 lifting lower limit"),//刀座1升降下限
                                        0, -100, 10000, 0, 2, "mm", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, root));

    // 刀座2升降上限,单位0.01mm,范围-100-10000
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_POSITION,
                                        82, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Knife holder 2 lifting upper limit"),//刀座2升降上限
                                        0, -100, 10000, 0, 2, "mm", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, root));

    // 刀座2升降下限,单位0.01mm,范围-100-10000
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_POSITION,
                                        83, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Knife holder 2 lifting lower limit"),//刀座2升降下限
                                        0, -100, 10000, 0, 2, "mm", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, root));

    // 刀座3升降上限,单位0.01mm,范围-100-10000
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_POSITION,
                                        84, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Knife holder 3 lifting upper limit"),//刀座3升降上限
                                        0, -100, 10000, 0, 2, "mm", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, root));

    // 刀座3升降下限,单位0.01mm,范围-100-10000
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_POSITION,
                                        85, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Knife holder 3 lifting lower limit"),//刀座3升降下限
                                        0, -100, 10000, 0, 2, "mm", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, root));

    //86
    // 圆刀加工抬刀高度, 范围 -100--10000，单位0.01mm
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_POSITION,
                                        86, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Height of tool lifting during circular cutting"),//圆刀加工抬刀高度
                                        0, -100, 10000, 0, 2, "mm", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, root));

    // 圆刀加工落刀高度，范围 -100--10000，单位0.01mm
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_POSITION,
                                        87, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Height of tool drop during circular cutting"),//圆刀加工落刀高度
                                        0, -100, 10000, 0, 2, "mm", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, operate));

    // 圆刀加工抬刀角度，范围 0--18000，单位0.01度
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_POSITION,
                                        88, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Angle of tool lifting during circular cutting"),//圆刀加工抬刀角度
                                        0, -100, 18000, 0, 2, cod->toUnicode("°"), tr(""),
                                        tr(""),
                                        0, 0, 0x0001, operate));

    //89
    // 震刀加工抬刀高度, 范围 -100--10000，单位0.01mm
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_POSITION,
                                        89, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Height of tool lifting Shock knife"),//震刀加工抬刀高度
                                        0, -100, 10000, 0, 2, "mm", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, root));

    // 震刀加工落刀高度，范围 -100--10000，单位0.01mm
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_POSITION,
                                        90, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Height of tool drop Shock knife"),//震刀加工落刀高度
                                        0, -100, 10000, 0, 2, "mm", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, operate));

    // 震刀加工抬刀角度，范围 0--18000，单位0.01度
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_POSITION,
                                        91, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Angle of tool lifting Shock knife"),//震刀加工抬刀角度
                                        0, -100, 18000, 0, 2, cod->toUnicode("°"), tr(""),
                                        tr(""),
                                        0, 0, 0x0001, operate));

    //92
    // 铣刀加工抬刀高度, 范围 -100--10000，单位0.01mm
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_POSITION,
                                        92, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Height of tool lifting milling cutter"),//铣刀加工抬刀高度
                                        0, -100, 10000, 0, 2, "mm", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, root));

    // 铣刀加工落刀高度，范围 -100--10000，单位0.01mm
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_POSITION,
                                        93, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Height of tool drop milling cutter"),//铣刀加工落刀高度
                                        0, -100, 10000, 0, 2, "mm", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, root));

    // 铣刀加工抬刀角度，范围 0--18000，单位0.01度
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_POSITION,
                                        94, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Angle of tool lifting milling cutter"),//铣刀加工抬刀角度
                                        0, -100, 18000, 0, 2, cod->toUnicode("°"), tr(""),
                                        tr(""),
                                        0, 0, 0x0001, root));

    //95
    // 偏心刀1加工抬刀高度, 范围 -100--10000，单位0.01mm
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_POSITION,
                                        95, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Eccentric tool 1 machining lifting height"),//偏心刀1加工抬刀高度
                                        0, -100, 10000, 0, 2, "mm", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, root));

    // 偏心刀1加工落刀高度，范围 -100--10000，单位0.01mm
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_POSITION,
                                        96, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Eccentric tool 1 machining tool drop height"),//偏心刀1加工落刀高度
                                        0, -100, 10000, 0, 2, "mm", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, root));

    // 偏心刀2加工抬刀高度, 范围 -100--10000，单位0.01mm
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_POSITION,
                                        97, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Eccentric tool 2 machining lift height"),//偏心刀2加工抬刀高度
                                        0, -100, 10000, 0, 2, "mm", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, root));
    // 偏心刀2加工落刀高度，范围 -100--10000，单位0.01mm
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_POSITION,
                                        98, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Eccentric tool 2 machining tool drop height"),//偏心刀2加工落刀高度
                                        0, -100, 10000, 0, 2, "mm", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, root));

    //99
    // 压轮加工抬刀高度, 范围 -100--10000，单位0.01mm
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_POSITION,
                                        99, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Tool lifting height during wheel pressing processing"),//压轮加工抬刀高度
                                        0, -100, 10000, 0, 2, "mm", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, root));

    // 压轮加工落刀高度，范围 -100--10000，单位0.01mm
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_POSITION,
                                        100, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Height of tool drop during wheel pressing"),//压轮加工落刀高度
                                        0, -100, 10000, 0, 2, "mm", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, root));

    // 压轮加工抬刀角度，范围 0--18000，单位0.01度
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_POSITION,
                                        101, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Pressing wheel processing tool lifting angle"),//压轮加工抬刀角度
                                        0, -100, 18000, 0, 2, cod->toUnicode("°"), tr(""),
                                        tr(""),
                                        0, 0, 0x0001, root));

    //102
    // 钻孔刀加工抬刀高度, 范围 -100--10000，单位0.01mm
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_POSITION,
                                        102, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Lifting height of drilling tool"),//钻孔刀加工抬刀高度
                                        0, -100, 10000, 0, 2, "mm", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, root));

    // 钻孔刀加工落刀高度 -100--10000，单位0.01mm
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_ACTION,
                                        103, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Cutting height of drilling tool during machining"),//钻孔刀加工落刀高度
                                        0, -100, 10000, 0, 2, "mm", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, root));

    //103
    // 刀笔加工抬刀高度, 范围 -100--10000，单位0.01mm
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_POSITION,
                                        104, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Knife and pen lifting height"),//刀笔加工抬刀高度
                                        0, -100, 10000, 0, 2, "mm", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, root));

    // 刀笔加工落刀高度 -100--10000，单位0.01mm
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_ACTION,
                                        105, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Knife and pen drop height"),//刀笔加工落刀高度
                                        0, -100, 10000, 0, 2, "mm", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, root));


    //刀压检测工装抬刀高度 单位0.01mm 范围 -100--10000
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_POSITION,
                                        106, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Knife pressure detection tool lifting height"),//刀压检测工装抬刀高度
                                        0, -100, 10000, 0, 2, "mm", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, root));

    //偏心刀1拐角升降,单位0.01mm 范围-500-500
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_ACTION,
                                        107, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Eccentric knife 1 corner lifting"),//偏心刀1拐角升降
                                        0, -500, 500, 0, 2, "mm", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, root));

    //偏心刀2拐角升降,单位0.01mm 范围-500-500
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_ACTION,
                                        108, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Eccentric knife 2 corner lifting"),//偏心刀2拐角升降
                                        0, -500, 500, 0, 2, "mm", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, root));

    // 109
    // 工作过程中抬刀高度,单位0.01mm
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_POSITION,
                                        109, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Lifting height of the knife during the working process"),//工作过程中抬刀高度
                                        0, -500, 500, 0, 2, "mm", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, root));

    // 110
    // 过窗电机编码器比例系数,  范围0~1000.00  单位:pulse/mm
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_ACTION,
                                        110, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Proportional coefficient of window motor encoder"),//过窗电机编码器比例系数
                                        0, 0, 100000, 0, 2, "pulse/mm", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, root));

    // 130
    // XY归零运行速度, 范围 1--100，单位mm/s，默认 100
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_SPEED,
                                        130, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("XY zero running speed"),//XY归零运行速度
                                        100, 1, 100, 100, 0, "mm/s", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, operate));
    // XY空走运行速度, 范围 100--1500,单位mm/s，默认 200
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        (MC_SORT_SETTING|MC_SORT_SPEED),
                                        131, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("XY idle running speed"),//XY空走运行速度
                                        200, 100, 1500, 200, 0, "mm/s", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, operate));
    // xy手动移动速度1, 范围 10--50，单位mm/s，默认 10
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_SPEED,
                                        132, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Xy manual movement speed 1"),//xy手动移动速度1
                                        10, 10, 50, 10, 0, "mm/s", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, operate));
    // xy手动移动速度2, 范围 50--200，单位mm/s，默认 100
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_SPEED,
                                        133, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Xy manual movement speed 2"),//xy手动移动速度2
                                        100, 50, 200, 100, 0, "mm/s", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, operate));
    // xy手动移动速度3, 范围 200--500，单位mm/s，默认 200
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_SPEED,
                                        134, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Xy manual movement speed 3"),//xy手动移动速度3
                                        200, 200, 500, 200, 0, "mm/s", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, operate));

    // 135
    // 升降归零速度,单位mm/s,范围1-50
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_SPEED,
                                        135, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Zero speed of lifting and lowering"),//升降归零速度
                                        10, 1, 50, 10, 0, "mm/s", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, operate));
    // 升降空走速度,范围 10-100, 单位mm/s，默认 50
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_SPEED,
                                        136, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Lifting and descending speed"),//升降空走速度
                                        50, 10, 100, 50, 0, "mm/s", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, operate));
    // 升降手动移动速度,范围 5--20，单位mm/s，默认 5
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_SPEED,
                                        137, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Manual movement speed for lifting and lowering"),//升降手动移动速度
                                        5, 5, 20, 5, 0, "mm/s", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, operate));

    // 旋转归零速度,单位deg/s,范围10-100
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_SPEED,
                                        138, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Rotation zeroing speed"),//旋转归零速度
                                        10, 10, 100, 10, 0, "deg/s", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, operate));

    // 旋转运行速度,单位deg/s,范围180-1800
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_SPEED,
                                        139, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Rotating running speed"),//旋转运行速度
                                        180, 180, 1800, 180, 0, "deg/s", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, operate));

    // 旋转手动移动速度,单位deg/s,范围1-180
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_SPEED,
                                        140, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Rotating manual movement speed"),//旋转手动移动速度
                                        10, 1, 180, 10, 0, "deg/s", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, operate));

    // 141
    // 最小速度变化限制 默认10 范围1-2000
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_SPEED,
                                        141, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Minimum speed change limit"),//最小速度变化限制
                                        10, 1, 2000, 10, 0, "", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, root));
    // 142
    // 传送带手动速度,单位mm/s,范围10-300
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_SPEED,
                                        142, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Manual speed of conveyor belt"),//传送带手动速度
                                        10, 10, 300, 10, 0, "mm/s", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, operate));

    // 143
    // 传送带运行速度,单位mm/s,范围10-200
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        (MC_SORT_SETTING|MC_SORT_SPEED),
                                        143, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Running speed of conveyor belt"),//传送带运行速度
                                        10, 10, 200, 10, 0, "mm/s", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, operate));

    // 144
    // X移动加速度, 范围 1--5000，单位mm/s2，默认 50
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_SPEED,
                                        144, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("X movement acceleration"),//X移动加速度
                                        50, 1, 5000, 50, 0, "mm/s2", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, operate));

    // Y移动加速度, 范围 1--5000，单位mm/s2，默认 50
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_SPEED,
                                        145, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Y movement acceleration"),//Y移动加速度
                                        50, 1, 5000, 50, 0, "mm/s2", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, operate));

    //150
    // 画笔最小绘画速度, 范围 1--100，单位mm/s，默认 10
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_SPEED,
                                        150, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("The minimum drawing speed of the brush"),//画笔最小绘画速度
                                        10, 1, 100, 10, 0, "mm/s", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, operate));
    // 画笔最大绘画速度, 范围 1--1500，单位mm/s，默认 1000
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        (MC_SORT_SETTING|MC_SORT_SPEED),
                                        151, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Maximum painting speed of the brush"),//画笔最大绘画速度
                                        600, 1, 800, 600, 0, "mm/s", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, operate));

    // 画笔绘画加速度, 范围 1--5000，单位mm/s2，默认 500
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_SPEED,
                                        152, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Brush painting acceleration"),//画笔绘画加速度
                                        500, 1, 5000, 500, 0, "mm/s2", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, operate));

    // 画笔绘画降速最小偏差角度，范围 0--18000，单位 0.01度，默认 3000
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_POSITION,
                                        153, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("The minimum deviation angle and range of brush painting speed reduction"),//画笔绘画降速最小偏差角度
                                        3000, 0, 18000, 3000, 2, cod->toUnicode("°"), tr(""),
                                        tr(""),
                                        0, 0, 0x0001, operate));

    //154
    // 圆刀最小切割速度, 范围 1--100，单位mm/s，默认 10
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_SPEED,
                                        154, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Minimum cutting speed of circular knife"),//圆刀最小切割速度
                                        10, 1, 100, 10, 0, "mm/s", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, operate));
    // 圆刀最大切割速度, 范围 1--1500，单位mm/s，默认 1000
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        (MC_SORT_SETTING|MC_SORT_SPEED),
                                        155, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Maximum cutting speed of circular cutter"),//圆刀最大切割速度
                                        600, 1, 1500, 600, 0, "mm/s", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, operate));

    // 圆刀切割加速度, 范围 1--5000，单位mm/s2，默认 500
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_SPEED,
                                        156, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Circular knife cutting acceleration"),//圆刀切割加速度
                                        500, 1, 5000, 500, 0, "mm/s2", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, operate));

    // 圆刀切割降速最小偏差角度，范围 0--18000，单位 0.01度，默认 3000
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_POSITION,
                                        157, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Minimum deviation angle for cutting speed reduction with a circular knife"),//圆刀切割降速最小偏差角度
                                        3000, 0, 18000, 3000, 2, cod->toUnicode("°"), tr(""),
                                        tr(""),
                                        0, 0, 0x0001, root));

    //158
    // 震刀最小切割速度, 范围 1--100，单位mm/s，默认 10
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_SPEED,
                                        158, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Minimum cutting speed of vibration knife"),//震刀最小切割速度
                                        10, 1, 100, 10, 0, "mm/s", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, operate));
    // 震刀最大切割速度, 范围 1--1500，单位mm/s，默认 1000
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        (MC_SORT_SETTING|MC_SORT_SPEED),
                                        159, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Maximum cutting speed of the vibrating knife"),//震刀最大切割速度
                                        600, 1, 800, 600, 0, "mm/s", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, operate));

    // 震刀切割加速度, 范围 1--5000，单位mm/s2，默认 500
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_SPEED,
                                        160, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Vibration knife cutting acceleration"),//震刀切割加速度
                                        500, 1, 5000, 500, 0, "mm/s2", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, operate));

    // 震刀切割降速最小偏差角度，范围 0--18000，单位 0.01度，默认 3000
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_POSITION,
                                        161, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Minimum deviation angle of vibration knife cutting speed reduction"),//震刀切割降速最小偏差角度
                                        3000, 0, 18000, 3000, 2, cod->toUnicode("°"), tr(""),
                                        tr(""),
                                        0, 0, 0x0001, root));

    // 162
    // 铣刀最小切割速度, 范围 1--100，单位mm/s，默认 10
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_SPEED,
                                        162, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Minimum cutting speed of milling cutter"),//铣刀最小切割速度
                                        10, 1, 100, 10, 0, "mm/s", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, root));
    // 铣刀最大切割速度, 范围 1--1500，单位mm/s，默认 1000
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_SPEED,
                                        163, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Maximum cutting speed of milling cutter"),//铣刀最大切割速度
                                        600, 1, 800, 600, 0, "mm/s", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, root));

    // 铣刀切割加速度, 范围 1--5000，单位mm/s2，默认 500
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_SPEED,
                                        164, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Milling cutter cutting acceleration"),//铣刀切割加速度
                                        500, 1, 5000, 500, 0, "mm/s2", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, root));

    // 铣刀切割降速最小偏差角度，范围 0--18000，单位 0.01度，默认 3000
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_POSITION,
                                        165, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Minimum deviation angle for milling cutter cutting speed reduction"),//铣刀切割降速最小偏差角度
                                        3000, 0, 18000, 3000, 2, cod->toUnicode("°"), tr(""),
                                        tr(""),
                                        0, 0, 0x0001, root));



    // 偏心刀1最小切割速度, 范围 1--100，单位mm/s，默认 10
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_SPEED,
                                        166, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Minimum cutting speed of Eccentric knife 1"),//偏心刀1最小切割速度
                                        10, 1, 100, 10, 0, "mm/s", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, root));
    // 偏心刀1最大切割速度, 范围 1--800，单位mm/s，默认 600
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_SPEED,
                                        167, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Maximum cutting speed of Eccentric knife1"),//偏心刀1最大切割速度
                                        600, 1, 800, 600, 0, "mm/s", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, root));

    // 偏心刀1切割加速度, 范围 1--5000,单位mm/s2，默认 500
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_SPEED,
                                        168, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Eccentric knife 1 cutting acceleration"),//偏心刀1切割加速度
                                        500, 1, 5000, 500, 0, "mm/s2", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, root));

    // 偏心刀1切割降速最小偏差角度,范围 0--18000，单位 0.01度，默认 3000
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_POSITION,
                                        169, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Minimum deviation angle for cutting speed reduction with a Eccentric knife 1"),//偏心刀1切割降速最小偏差角度
                                        3000, 0, 18000, 3000, 2, cod->toUnicode("°"), tr(""),
                                        tr(""),
                                        0, 0, 0x0001, root));

    // 偏心刀2最小切割速度, 范围 1--100，单位mm/s，默认 10
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_SPEED,
                                        170, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Minimum cutting speed of Eccentric knife 2"),//偏心刀2最小切割速度
                                        10, 1, 100, 10, 0, "mm/s", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, root));
    // 偏心刀2最大切割速度, 范围 1--800,单位mm/s,默认 600
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_SPEED,
                                        171, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Maximum cutting speed of Eccentric knife 2"),//偏心刀2最大切割速度
                                        600, 1, 800, 600, 0, "mm/s", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, root));

    // 偏心刀2切割加速度, 范围 1--5000，单位mm/s2，默认 500
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_SPEED,
                                        172, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Eccentric knife 2 cutting acceleration"),//偏心刀2切割加速度
                                        500, 1, 5000, 500, 0, "mm/s2", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, root));

    // 偏心刀2切割降速最小偏差角度,范围 0--18000，单位 0.01度，默认 3000
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_POSITION,
                                        173, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Minimum deviation angle for cutting speed reduction with a Eccentric knife 2"),//偏心刀2切割降速最小偏差角度
                                        3000, 0, 18000, 3000, 2, cod->toUnicode("°"), tr(""),
                                        tr(""),
                                        0, 0, 0x0001, root));

    // 压轮最小工作速度, 范围 1--100，单位mm/s，默认 10
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_SPEED,
                                        174, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Minimum cutting speed of Pressure wheel"),//压轮最小工作速度
                                        10, 1, 100, 10, 0, "mm/s", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, root));
    // 压轮最大工作速度, 范围 1--1500，单位mm/s，默认 1000
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_SPEED,
                                        175, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Maximum work speed of Pressure wheel"),//压轮最大切割速度
                                        600, 1, 800, 600, 0, "mm/s", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, root));

    // 压轮工作加速度, 范围 1--5000，单位mm/s2，默认 500
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_SPEED,
                                        176, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Pressure wheel cutting acceleration "),//压轮工作加速度
                                        500, 1, 5000, 500, 0, "mm/s2", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, root));

    // 压轮工作降速最小偏差角度，范围 0--18000，单位 0.01度，默认 3000
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_POSITION,
                                        177, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Minimum deviation angle for cutting speed reduction of Pressure wheel"),//偏心刀2切割降速最小偏差角度
                                        3000, 0, 18000, 3000, 2, cod->toUnicode("°"), tr(""),
                                        tr(""),
                                        0, 0, 0x0001, root));

    // 刀笔下降延时, 范围 0--5000，单位 毫秒
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        (MC_SORT_SETTING|MC_SORT_ACTION),
                                        200, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Knife and pencil descent delay"),//刀笔下降延时
                                        0, 0, 5000, 0, 0, "ms", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, operate));

    // 圆刀启动延时, 范围 0--5000，单位 毫秒
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_ACTION,
                                        201, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Round knife start delay"),//圆刀启动延时
                                        0, 0, 5000, 0, 0, "ms", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, root));

    // 震刀启动延时, 范围 0--5000，单位 毫秒
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_ACTION,
                                        202, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Shockknife start delay"),//震刀启动延时
                                        0, 0, 5000, 0, 0, "ms", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, root));

    // 铣刀启动延时, 范围 0--5000，单位 毫秒
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_ACTION,
                                        203, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Milling cutter start delay"),//铣刀启动延时
                                        0, 0, 5000, 0, 0, "ms", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, root));

    // 钻孔刀下降延时, 范围 0--5000，单位 毫秒
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_ACTION,
                                        204, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Drilling tool descent delay"),//钻孔刀下降延时
                                        0, 0, 5000, 0, 0, "ms", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, root));

}

void FlyFlatCutting::initWkParasList()
{
    //    QTextCodec *cod = QTextCodec::codecForLocale();
    // 79
    // 风机启动延时, 范围 0--10，单位秒
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        (MC_SORT_SETTING|MC_SORT_ACTION),
                                        79, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Fan start delay"),// 风机启动延时
                                        0, 0, 10, 0, 0, "s", tr(""),
                                        tr(""), 0, 0, 0x0001, operate));
    // 风机关闭延时, 范围 0--30,单位秒
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_ACTION,
                                        80, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Fan shutdown delay"),// 风机关闭延时
                                        0, 0, 30, 0, 0, "s", tr(""),
                                        tr(""), 0, 0, 0x0001, root));

    // 产量预设, 0, 关闭功能；其余，按照预设产量提示
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_SETTING,
                                        81, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Production preset"),// 产量预设
                                        0, 0, S32_MAX, 0, 0, tr(""), tr(""),
                                        tr(""),0, 0, 0x0001, root));

    // 完成后停车位置选择, 0, 当前位置
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_SETTING,
                                        82, 0, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Parking location selection after completion"),// 完成后停车位置选择
                                        0, 0, S32_MAX, 0, 0, tr(""), tr(""),
                                        tr("current location:0;starting point:1;Offset point:2;origin Point:3"),0, 0, 0x0001, root));//当前位置 0 ，起点1 偏移点2,原点3

    // 吸附区域选择,按位设置
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_SETTING,
                                        83, 1, 0, PARA_VALUE_TYPE_SW,
                                        tr("Adsorption Zone 1"),// 吸附区域1
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr(""),0, 0, 0x0001, root));
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_SETTING,
                                        83, 2, 0, PARA_VALUE_TYPE_SW,
                                        tr("Adsorption Zone 2"),// 吸附区域2
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr(""),0, 0, 0x0001, root));
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_SETTING,
                                        83, 3, 0, PARA_VALUE_TYPE_SW,
                                        tr("Adsorption Zone 3"),// 吸附区域3
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr(""),0, 0, 0x0001, root));
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_SETTING,
                                        83, 4, 0, PARA_VALUE_TYPE_SW,
                                        tr("Adsorption Zone 4"),// 吸附区域4
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr(""),0, 0, 0x0001, root));

    // 横切起始位置,单位0.01mm,范围-500000-500000
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_POSITION,
                                        84, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Starting position of cross cutting"),// 横切起始位置
                                        0, -500000, 500000, 0, 2, "mm", tr(""),
                                        tr(""),0, 0, 0x0001, operate));
    // 横切结束位置,单位0.01mm,范围-500000-500000
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_POSITION,
                                        85, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("End position of cross cutting"),// 横切结束位置
                                        0, -500000, 500000, 0, 2, "mm", tr(""),
                                        tr(""),0, 0, 0x0001, operate));
    // 86
    // 横切x向补偿距离,单位0.01mm,范围-2000-2000
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_SETTING,
                                        86, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Cross cutting compensation distance"),// 横切补偿距离
                                        0, -2000, 2000, 0, 2, "mm", tr(""),
                                        tr(""),0, 0, 0x0001, root));

    // 99

    // 安全输入允许，位图选择，0, 不允许; 1, 允许;
    // bit0, 光幕;
    //    m_allParasList.append(makeAParaItem(0,
    //                                        PARA_TYPE_WORK,
    //                                        MC_SORT_DETECT,
    //                                        100, 1, 0, PARA_VALUE_TYPE_LIST,
    //                                        tr("Secure input light curtain allows"),// 安全输入光幕允许
    //                                        0, 0, 1, 0, 0, tr(""), tr(""),
    //                                        tr("Not allow:0;Allowed:1"), 0, 0, 0x0001, operate));
    //    // bit1 气压;
    //    m_allParasList.append(makeAParaItem(0,
    //                                        PARA_TYPE_WORK,
    //                                        MC_SORT_DETECT,
    //                                        100, 2, 0, PARA_VALUE_TYPE_LIST,
    //                                        tr("Safety input pressure allowed"),// 安全输入气压允许
    //                                        1, 0, 1, 1, 0, tr(""), tr(""),
    //                                        tr("Not allow:0;Allowed:1"), 1, 1, 0x0001, operate));

    // 开机动作 //bit 0 电机归零
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_ACTION,
                                        101, 1, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Startup motor to zero"),// 开机电机归零
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr("Not allow:0;Allowed:1"), 0, 0, 0x0001, root));

    // 功能控制
    //bit0 :风机吸附开关   0,手动 1,自动
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        (MC_SORT_SETTING|MC_SORT_ACTION),
                                        102, 1, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Fan adsorption switch"),// 风机吸附开关
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr("manual:0;auto:1"), 0, 0, 0x0001, operate));
    //bit1 :横切功能选择   0,手动 1,自动
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_ACTION,
                                        102, 2, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Cross cutting function selection"),// 横切功能选择
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr("manual:0;auto:1"), 0, 0, 0x0001, root));

    //bit2 :被动旋转刀   0,手动 1,自动
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_SETTING,
                                        102, 3, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Passive rotary knife"),// 被动旋转刀
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr("manual:0;auto:1"), 0, 0, 0x0001, root));

    //// bit3:边走边裁		0,禁止	1,允许
    //m_allParasList.append(makeAParaItem(0,
    //                                    PARA_TYPE_WORK,
    //                                    (MC_SORT_SETTING|MC_SORT_ACTION),
    //                                    102, 4, 0, PARA_VALUE_TYPE_SW,
    //                                    tr("Cutting while walking"),// 边走边裁
    //                                    0, 0, 1, 0, 0, tr(""), tr(""),
    //                                    tr(""), 0, 0, 0x0001, operate));

    // bit4:连续切割		0,禁止	1,允许
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        (MC_SORT_SETTING|MC_SORT_ACTION),
                                        102, 5, 0, PARA_VALUE_TYPE_SW,
                                        tr("Continuous cutting"),// 连续切割
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0001, operate));

    // bit5:缺料检测		0,禁止	1,允许
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        (MC_SORT_SETTING|MC_SORT_DETECT),
                                        102, 6, 0, PARA_VALUE_TYPE_SW,
                                        tr("Shortage detection"),// 缺料检测
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0001, operate));

    // 偏移点坐标X,单位0.01mm, 范围 -2147483648--2147483647
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_POSITION,
                                        103, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Offset X"),// 偏移点坐标 X
                                        0, S32_MIN, S32_MAX, 0, 2, "mm", tr(""),
                                        tr(""),0, 0, 0x0001, root));
    // 偏移点坐标Y,单位0.01mm, 范围 -2147483648--2147483647
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_POSITION,
                                        104, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Offset Y"),// 偏移点坐标 Y
                                        0, S32_MIN, S32_MAX, 0, 2, "mm", tr(""),
                                        tr(""),0, 0, 0x0001, root));

    // 刀压检测坐标X,单位0.01mm
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_POSITION,
                                        105, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Knife Check X"),// 刀压检测坐标X
                                        0, S32_MIN, S32_MAX, 0, 2, "mm", tr(""),
                                        tr(""),0, 0, 0x0001, root));
    // 刀压检测坐标Y,单位0.01mm
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_POSITION,
                                        106, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Knife Check Y"),// 刀压检测坐标Y
                                        0, S32_MIN, S32_MAX, 0, 2, "mm", tr(""),
                                        tr(""),0, 0, 0x0001, root));

    //  被动刀旋转坐标X,单位0.01mm
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_POSITION,
                                        107, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Passive knife rotation coordinate X"),// 被动刀旋转坐标X
                                        0, S32_MIN, S32_MAX, 0, 2, "mm", tr(""),
                                        tr(""),0, 0, 0x0001, root));
    //  被动刀旋转坐标Y,单位0.01mm
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_POSITION,
                                        108, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Passive knife rotation coordinate Y"),// 被动刀旋转坐标Y
                                        0, S32_MIN, S32_MAX, 0, 2, "mm", tr(""),
                                        tr(""),0, 0, 0x0001, root));

    // 109 原点坐标X,单位0.01mm
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_POSITION,
                                        109, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Origin coordinates X"),// 原点坐标X
                                        0, S32_MIN, S32_MAX, 0, 2, "mm", tr(""),
                                        tr(""),0, 0, 0x0001, root));
    // 110 原点坐标Y,单位0.01mm
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_POSITION,
                                        110, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Origin coordinates Y"),// 原点坐标Y
                                        0, S32_MIN, S32_MAX, 0, 2, "mm", tr(""),
                                        tr(""),0, 0, 0x0001, root));

    //111
    // 图形间隔,单位0.01mm, 范围 0--1000.00mm
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_SETTING,
                                        111, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Graph spacing"),// 图形间隔
                                        0, 0, 100000, 0, 2, "mm", tr(""),
                                        tr(""),0, 0, 0x0001, operate));

    //切割后送料   0关闭 1 打开
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_SETTING,
                                        112, 0, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Cut and send the material"),// 切割后送料
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr("close:0;open:1"), 0, 0, 0x0001, root));

}

#define	MT_LX				0x0001	// X向移动电机
#define	MT_LY				0x0002	// Y向移动电机
#define	MT_LU1				0x0003	// U1电机
#define	MT_LU2				0x0004	// U2电机
#define	MT_LU3				0x0005	// U3电机
#define	MT_LR1				0x0006	// R1电机
#define	MT_LR2				0x0007	// R2电机
#define	MT_LR3				0x0008	// R3电机
#define MT_LEDGE			0x0009	// 纠偏电机
#define MT_LFF				0x000A	// 过窗电机
#define MT_LB				0x000B	// 传送带电机


void FlyFlatCutting::initOutCtrlList()
{
    m_allOutCtrlList.clear();
    int showPriority = 1;
    m_allOutCtrlList.append(creatZeroForwardReverseItem(0,showPriority++,tr("X to move motor"),MT_LX));// X向移动电机(归零,正转,反转)
    m_allOutCtrlList.append(creatZeroForwardReverseItem(0,showPriority++,tr("Y to move motor"),MT_LY));// Y向移动电机(归零,正转,反转)
    m_allOutCtrlList.append(creatZeroForwardReverseItem(0,showPriority++,tr("Lifting motor 1"),MT_LU1));// 升降电机1(归零,正转,反转)
    m_allOutCtrlList.append(creatZeroForwardReverseItem(0,showPriority++,tr("Lifting motor 2"),MT_LU2));// 升降电机2(归零,正转,反转)

    m_allOutCtrlList.append(creatZeroForwardReverseItem(0,showPriority++,tr("Rotating motor 1"),MT_LR1));// 旋转电机1(归零,正转,反转)
    m_allOutCtrlList.append(creatZeroForwardReverseItem(0,showPriority++,tr("Rotating motor 2"),MT_LR2));// 旋转电机2(归零,正转,反转)
    // 纠偏电机(正转,反转)
    m_allOutCtrlList.append(makeAOutCtrlItem(0,showPriority++,tr("MT_LEDGE"),MT_LEDGE,// 纠偏电机
                                             "",false,-1,-1,-1,
                                             "",false,-1,-1,-1,
                                             "",false,-1,-1,-1,
                                             jogPStr,true,-1,OUTCONTROL_JOGP,OUTCONTROL_STOP,
                                             jogNStr,true,-1,OUTCONTROL_JOGN,OUTCONTROL_STOP));
    // 传送带电机(正转,反转)
    m_allOutCtrlList.append(makeAOutCtrlItem(0,showPriority++,tr("CONVEYOR BELT"),MT_LB,// 传送带电机
                                             "",false,-1,-1,-1,
                                             "",false,-1,-1,-1,
                                             "",false,-1,-1,-1,
                                             jogPStr,true,-1,OUTCONTROL_JOGP,OUTCONTROL_STOP,
                                             jogNStr,true,-1,OUTCONTROL_JOGN,OUTCONTROL_STOP));
/*
    m_allOutCtrlList.append(makeAOutCtrlItem(0,showPriority++,tr("Knife pressure collection"),KNIFE_COLLECT,//刀压采集
                                             "",false,-1,-1,-1,
                                             "",false,-1,-1,-1,
                                             "",false,-1,-1,-1,
                                             "",false,-1,-1,-1,
                                             openStr,true,MANUALACTION_RUN,-1,-1));

    m_allOutCtrlList.append(makeAOutCtrlItem(0,showPriority++,tr("Left Knife pressure test"),KNIFE_U1_TEST,//左刀刀压测试
                                             "",false,-1,-1,-1,
                                             "",false,-1,-1,-1,
                                             "",false,-1,-1,-1,
                                             "",false,-1,-1,-1,
                                             openStr,true,MANUALACTION_RUN,-1,-1));

    m_allOutCtrlList.append(makeAOutCtrlItem(0,showPriority++,tr("Right Kinife pressure test"),KNIFE_U2_TEST,//右刀刀压测试
                                             "",false,-1,-1,-1,
                                             "",false,-1,-1,-1,
                                             "",false,-1,-1,-1,
                                             "",false,-1,-1,-1,
                                             openStr,true,MANUALACTION_RUN,-1,-1));

    m_allOutCtrlList.append(makeAOutCtrlItem(0,showPriority++,tr("Set the position for tool pressure detection"),SET_KNIFETEST_POS,//设置刀压检测位置
                                             "",false,-1,-1,-1,
                                             "",false,-1,-1,-1,
                                             "",false,-1,-1,-1,
                                             "",false,-1,-1,-1,
                                             openStr,true,MANUALACTION_RUN,-1,-1));
    m_allOutCtrlList.append(makeAOutCtrlItem(0,showPriority++,tr("Transverse cutting"),CROSS_CUT,//横切
                                             "",false,-1,-1,-1,
                                             "",false,-1,-1,-1,
                                             "",false,-1,-1,-1,
                                             "",false,-1,-1,-1,
                                             openStr,true,MANUALACTION_RUN,-1,-1));
    m_allOutCtrlList.append(makeAOutCtrlItem(0,showPriority++,tr("Adsorption main switch"),OT_MAINADSORB,// 吸附总开关
                                             "",false,-1,-1,-1,
                                             "",false,-1,-1,-1,
                                             "",false,-1,-1,-1,
                                             openStr,true,OUTCONTROL_OPEN,-1,-1,
                                             closeStr,true,OUTCONTROL_CLOSE,-1,-1));
*/
}

void FlyFlatCutting::initShortCutList()
{
    m_allShortCutList.clear();
    int index = 1;
    m_allShortCutList.append(makeAShortCutItem(0,index++,tr("All_Zero"),"buttonAllToZero",FUN_ALLTOZERO));// 全部归零
    m_allShortCutList.append(makeAShortCutItem(0,index++,tr("ProcessReset"),"buttonProcessReset",FUN_PROCESSRESET));//流程复位
    m_allShortCutList.append(makeAShortCutItem(0,index++,tr("Simulated"),"buttonSimulatedStatus",FUN_SIMULATED_STATUS));// 模拟工作
    m_allShortCutList.append(makeAShortCutItem(0,index++,tr("Front_Back"),"buttonForwardOrBack",FUN_FORWARDORBACK));// 快进快退
    m_allShortCutList.append(makeAShortCutItem(0,index++,tr("OutputReset"),"buttonFrameZero",FUN_OUTPUTRESET));//产量清零

    m_allShortCutList.append(makeAShortCutItem(0,index++,tr("backZeroPoint"),"buttonBackToOrigin",FUN_BACKTOORIGIN));// 回零点
    m_allShortCutList.append(makeAShortCutItem(0,index++,tr("backStartPoint"),"buttonBackEmbPoint",FUN_BACKSTARTPOINT));// 回起始点
    //    m_allShortCutList.append(makeAShortCutItem(0,index++,tr("gotoFinish"),"buttonBackAnchorPoint",FUN_GOTO_FINISH));// 回结束点

    m_allShortCutList.append(makeAShortCutItem(0,index++,tr("SetPositioning"),"buttonSetEmbPoint",FUN_FLAT_SETANCHORPOINT));//定定位点
    m_allShortCutList.append(makeAShortCutItem(0,index++,tr("Back anchor"),"buttonBackWorkPoint",FUN_CUTTINGPOINT));// 回定位点
    //    m_allShortCutList.append(makeAShortCutItem(0,index++,tr("SetOffsetPoint"),"buttonSetAnchorPoint",FUN_SETOFFSETPOINT));// 定偏移点
    //    m_allShortCutList.append(makeAShortCutItem(0,index++,tr("backOffsetPoint"),"buttonBackOffsetPoint",FUN_BACKOFFSETPOINT));// 回偏移点

    m_allShortCutList.append(makeAShortCutItem(0,index++,tr("Knife pressure collection"),"buttonKnifePressureCollection",FUN_KNIFE_COLLECT));//刀压采集
    m_allShortCutList.append(makeAShortCutItem(0,index++,tr("Display collected data"),"DisplayCollectedData",FUN_DISPLAY_COLLECTED_DATA));//显示采集数据
    m_allShortCutList.append(makeAShortCutItem(0,index++,tr("Knife pressure test"),"KnifePressure",FUN_KNIFE_TEST));//刀压测试
    m_allShortCutList.append(makeAShortCutItem(0,index++,tr("Set the position for tool pressure detection"),"SetPositionDetection",FUN_SET_KNIFETEST_POS));//设置刀压检测位置
    m_allShortCutList.append(makeAShortCutItem(0,index++,tr("Cross cutting"),"chiselPoint",FUN_CROSS_CUT));//横切
    m_allShortCutList.append(makeAShortCutItem(0,index++,tr("Fan area"),"buttonFanCtrl",FUN_FAN_AREA));//风机


}

void FlyFlatCutting::initAssistList()
{
    m_allAssistList.clear();

    m_allAssistList.append(makeAAssistItem(0,0x0001,tr("Signal"),"buttonSensor",ASSIST_SENSOR));//传感器信号
    m_allAssistList.append(makeAAssistItem(0,0x0002,tr("Action"),"buttonControlAction",ASSIST_CONTROLACTION));//控制动作
#ifdef Q_OS_LINUX
    m_allAssistList.append(makeAAssistItem(0,0x0003,tr("HMIUpgrade"),"buttonHMIUpgrade",ASSIST_HMIUPGRADE));//界面升级
#endif
    m_allAssistList.append(makeAAssistItem(0,0x0004,tr("MCUpgrade"),"buttonMCUpgrade",ASSIST_MCUPGRADE));//主控升级
    m_allAssistList.append(makeAAssistItem(0,0x0006,tr("ParaImport"),"buttonParaImport",ASSIST_PARAIMPORT));//参数导入
    m_allAssistList.append(makeAAssistItem(0,0x0007,tr("ParaExport"),"buttonParaExport",ASSIST_PARAEXPORT));//参数导出
    m_allAssistList.append(makeAAssistItem(0,0x0008,tr("SoftwareSet"),"buttonSoftwareSet",ASSIST_SOFTWARESET));//软件设置
    m_allAssistList.append(makeAAssistItem(0,0x000A,tr("Network"),"buttonNetworkManage",ASSIST_NETWORK));//网络管理
    m_allAssistList.append(makeAAssistItem(0,0x000C,tr("Time"),"buttonTimeSet",ASSIST_TIMESET));//时间设置
    m_allAssistList.append(makeAAssistItem(0,0x000F,tr("Version"),"buttonVersionInfo",ASSIST_MCVERSION));//版本信息
    m_allAssistList.append(makeAAssistItem(0,0x0010,tr("Authorization"),"buttonSoftwareAuthor",ASSIST_AUTHORIZATION));//软件授权
    m_allAssistList.append(makeAAssistItem(0,0x0014,tr("Root"),"buttonRoot",ASSIST_ROOT));//超级用户

}

void FlyFlatCutting::initFileSetList()
{
    m_allPatternSetList.clear();

    m_allPatternSetList.append(makeAPatternSetItem(0,0x0002,tr("Para"),"buttonPatternPara",PATTERNSET_ALGORITHMPARA));//分割参数
    m_allPatternSetList.append(makeAPatternSetItem(0,0x0001,tr("Select"),"buttonPatternSelect",PATTERNSET_PATTERNSELECT));//文件选择
    m_allPatternSetList.append(makeAPatternSetItem(0,0x0004,tr("Import"),"buttonPatternImport",PATTERNSET_PATTERNIMPORT));//文件导入
    m_allPatternSetList.append(makeAPatternSetItem(0,0x0005,tr("Export"),"buttonPatternExport",PATTERNSET_PATTERNEXPORT));//文件导出
    m_allPatternSetList.append(makeAPatternSetItem(0,0x0006,tr("Delete"),"buttonPatternDelete",PATTERNSET_PATTERNDELETE));//文件删除
}

void FlyFlatCutting::initParaSetList()
{
    m_allParaSetList.clear();

    m_allParaSetList.append(makeAParaSetItem(0,0x0001,tr("WorkPara"),"buttonActionSet",PARASET_SETTING));//工作参数
    m_allParaSetList.append(makeAParaSetItem(0,0x0002,tr("ActionSet"),"buttonActionParas",PARASET_ACTION));//动作参数(290810)
    m_allParaSetList.append(makeAParaSetItem(0,0x0003,tr("SpeedPara"),"buttonSpeedParas",PARASET_SPEED));//速度参数(290810)
    m_allParaSetList.append(makeAParaSetItem(0,0x0004,tr("DetectPara"),"buttonDetectParas",PARASET_DETECT));// 检测参数(290810)
    m_allParaSetList.append(makeAParaSetItem(0,0x0005,tr("PositionPara"),"buttonPositionParas",PARASET_POSITION));//位置参数(290810)
    m_allParaSetList.append(makeAParaSetItem(0,0x0005,tr("AllPara"),"buttonSettingParas",PARASET_ALL));//全部参数(262574)
}

#define	DSS_BIT1		0x01	// idx1
#define	DSS_BIT2		0x02	// idx2
#define	DSS_BIT3		0x04	// idx3
#define	DSS_BIT4		0x08	// idx4
#define	DSS_BIT5		0x10	// idx5
#define	DSS_BIT6		0x20	// idx6
#define	DSS_BIT7		0x40	// idx7
#define	DSS_BIT8		0x80	// idx8

#define	DSS1_B_START_BT		0x0000	// 启动按钮(1~8)
#define	DSS1_B_PAUSE_BT		0x0001	// 暂停按钮(1~8)
#define	DSS1_B_READY_BT		0x0005	// 就绪按钮(1~8)
#define	DSS2_F1_X		DSS_BIT1	// X  (主框架X)
#define	DSS2_F1_Y		DSS_BIT2	// Y  (主框架Y)
#define	DSS2_F1_ZERO_POS	0x0020	// 框架(轴)1 零位
#define	DSS2_UD_CU1_POS		0x0048	// 裁切机头 高位(1~8)
#define	DSS1_B_AIR_TEST		0x0007	// 气压检测(1~8)
#define	DSS_HEAD_01		DSS_BIT1	// idx1
#define	DSS_HEAD_02		DSS_BIT2	// idx2
#define	DSS_HEAD_03		DSS_BIT3	// idx3
#define	DSS_HEAD_04		DSS_BIT4	// idx4
#define	DSS_HEAD_05		DSS_BIT5	// idx5
#define	DSS_HEAD_06		DSS_BIT6	// idx6
#define	DSS_HEAD_07		DSS_BIT7	// idx7
#define	DSS_HEAD_08		DSS_BIT8	// idx8
#define	DSS1_B_SAFE_TEST	0x0008	// 安全输入(1~8)

// J1
//#define IsStartButton			GetInput1Status	// 启动按钮
//#define IsStopButton			GetInput2Status	// 停止按钮
//#define IsStartButton2			GetInput3Status	// 启动按钮2(双手启动)
//#define	IsResetButton			GetInput4Status	// 复位按钮

#define	N1_INPUT1_IDX		DSS1_B_START_BT		// 启动按钮
#define	N1_INPUT1_BIT		DSS_BIT1
#define	N1_INPUT2_IDX		DSS1_B_PAUSE_BT		// 暂停按钮
#define	N1_INPUT2_BIT		DSS_BIT1
#define	N1_INPUT3_IDX		DSS1_B_START_BT		// 启动按钮
#define	N1_INPUT3_BIT		DSS_BIT2
#define	N1_INPUT4_IDX		DSS1_B_READY_BT		// 复位按钮
#define	N1_INPUT4_BIT		DSS_BIT1

// J2
//#define IsXZeroPos			GetInput7Status		// X零位

#define	N1_INPUT7_IDX		DSS2_F1_ZERO_POS	// 框架(轴)1 零位
#define	N1_INPUT7_BIT		DSS2_F1_X

// J3
//#define IsAirPressureOk			GetInput10Status		// 气压保护检测
#define	N1_INPUT10_IDX		DSS1_B_AIR_TEST		// 气压检测
#define	N1_INPUT10_BIT		DSS_BIT1

//#define IsYZeroPos			GetInput11Status		// Y零位

#define	N1_INPUT11_IDX		DSS2_F1_ZERO_POS	// 框架(轴)1 零位
#define	N1_INPUT11_BIT		DSS2_F1_Y

// J4
#if (LIFT_U1 == 1)
#define IsU1ZeroPos			GetInput13Status		// U1零位

#define	N1_INPUT13_IDX		DSS2_UD_CU1_POS
#define	N1_INPUT13_BIT		DSS_HEAD_01

#define IsU1ZPPos			GetInput14Status		// U1 ZP

#define	N1_INPUT14_IDX		DSS2_UD_CU1_POS
#define	N1_INPUT14_BIT		DSS_HEAD_04

#endif

#if (LIFT_U2 == 1)
#define IsU2ZeroPos			GetInput15Status		// U2零位

#define	N1_INPUT15_IDX		DSS2_UD_CU1_POS
#define	N1_INPUT15_BIT		DSS_HEAD_02

#define IsU2ZPPos			GetInput16Status		// U2 ZP

#define	N1_INPUT16_IDX		DSS2_UD_CU1_POS
#define	N1_INPUT16_BIT		DSS_HEAD_05

#endif

// J5
#if (KNIFE_PRESSURE == 1)
#define IsKnifeCheckPos		GetInput18Status		// 刀压检测
#define	N1_INPUT18_IDX		DSS2_UD_CU1_POS
#define	N1_INPUT18_BIT		DSS_HEAD_07
#endif

// J6
//#define IsSafetyInput			GetInput21Status	// 光幕
#define	N1_INPUT21_IDX		DSS1_B_SAFE_TEST
#define	N1_INPUT21_BIT		DSS_BIT1

#define	DSS2_CT_ZERO1_POS	0x003C	// 裁刀旋转零位(1~8)
#define	DSS2_CT_ZERO2_POS	0x003D	// 裁刀旋转零位(9~16)
#define	DSS2_UD_CU1_POS		0x0048	// 裁切机头 高位(1~8)
#define	DSS2_UD_CU2_POS		0x0049	// 裁切机头 高位(9~16)
#define	DSS2_UD_CD1_POS		0x004A	// 裁切机头 低位(1~8)
#define	DSS2_UD_CD2_POS		0x004B	// 裁切机头 低位(9~16)
#define	DSS2_UD_IU1_POS		0x004C	// 画笔机头 高位(1~8)
#define	DSS2_UD_IU2_POS		0x004D	// 画笔机头 高位(9~16)
#define	DSS2_UD_ID1_POS		0x004E	// 画笔机头 低位(1~8)
#define	DSS2_UD_ID2_POS		0x004F	// 画笔机头 低位(9~16)


#define	DSS6_ADDR_03B8		0x03B8	//
                            // BIT1 :	切割压料气缸-上位
                            // BIT2 :	切割压料气缸-下位
                            // BIT3 :	上贴合液压缸-上位
                            // BIT4 :	上贴合液压缸-下位
                            // BIT5 :	下贴合液压缸-上位
                            // BIT6 :	下贴合液压缸-下位
                            // BIT7 :	控制板摇杆 X+
                            // BIT8 :	控制板摇杆 X-

#define	DSS6_ADDR_03B9		0x03B9	//
                                    // BIT1 :	控制板摇杆 Y+
                                    // BIT2 :	控制板摇杆 Y-
                                    // BIT3 :	控制板横切按钮
                                    // BIT4 :	控制板Fn按钮
                                    // BIT5 :	对边传感器1
                                    // BIT6 :	对边传感器2
                                    // BIT7 :	对边正限位
                                    // BIT8 :	对边负限位

#define	DSS6_ADDR_03BA		0x03BA	//
                            // BIT1 :	收料报警状态
                            // BIT2 :	收料手自动状态
                            // BIT3 :
                            // BIT4 :
                            // BIT5 :
                            // BIT6 :
                            // BIT7 :
                            // BIT8 :


//初始化传感器列表
void FlyFlatCutting::initSensorList()
{
    QList <SensorItem> sensorList;
    sensorList.append(makeASensorItem(DSS1_B_START_BT, 0, tr("Start button 1")));//启动按钮1
    sensorList.append(makeASensorItem(DSS1_B_START_BT, 1, tr("Start button 2")));//启动按钮2
    sensorList.append(makeASensorItem(DSS1_B_PAUSE_BT, 0, tr("Pause button 1")));//暂停按钮1
    sensorList.append(makeASensorItem(DSS1_B_READY_BT, 0, tr("Reset button")));//复位按钮
    sensorList.append(makeASensorItem(DSS2_F1_ZERO_POS, 1, tr("X zero position")));//X零位
    sensorList.append(makeASensorItem(DSS2_F1_ZERO_POS, 0, tr("Y zero position")));//Y零位
    sensorList.append(makeASensorItem(DSS1_B_AIR_TEST, 0, tr("Pressure protection detection")));//气压保护检测
    sensorList.append(makeASensorItem(DSS2_UD_CU1_POS, 1, tr("U1 zero position")));//U1零位
    sensorList.append(makeASensorItem(DSS2_UD_CU1_POS, 0, tr("U1 ZP")));//U1 ZP
    sensorList.append(makeASensorItem(DSS2_UD_CU1_POS, 3, tr("U2 zero position")));//U2零位
    sensorList.append(makeASensorItem(DSS2_UD_CU1_POS, 4, tr("U2 ZP")));//U2 ZP
    sensorList.append(makeASensorItem(DSS2_UD_CU1_POS, 6, tr("Knife pressure detection")));//刀压检测
    sensorList.append(makeASensorItem(DSS1_B_SAFE_TEST, 0, tr("Light curtain")));//光幕

    sensorList.append(makeASensorItem(DSS2_CT_ZERO1_POS, 0, tr("Cutting blade rotation zero position1")));//裁刀旋转零位1
    sensorList.append(makeASensorItem(DSS2_CT_ZERO1_POS, 1, tr("Cutting blade rotation zero position2")));//裁刀旋转零位2
    sensorList.append(makeASensorItem(DSS6_ADDR_03B8, 6, tr("Control panel joystick X+")));//控制板摇杆 X+
    sensorList.append(makeASensorItem(DSS6_ADDR_03B8, 7, tr("Control panel joystick X-")));//控制板摇杆 X-
    sensorList.append(makeASensorItem(DSS6_ADDR_03B9, 0, tr("Control panel joystick Y+")));//控制板摇杆 Y+
    sensorList.append(makeASensorItem(DSS6_ADDR_03B9, 1, tr("Control panel joystick Y-")));//控制板摇杆 Y-
    sensorList.append(makeASensorItem(DSS6_ADDR_03B9, 2, tr("Control board crosscutting button")));//控制板横切按钮
    sensorList.append(makeASensorItem(DSS6_ADDR_03B9, 3, tr("Control board Fn button")));//控制板Fn按钮
    sensorList.append(makeASensorItem(DSS6_ADDR_03B9, 4, tr("Opposite edge sensor 1")));//对边传感器1
    sensorList.append(makeASensorItem(DSS6_ADDR_03B9, 5, tr("Opposite edge sensor 2")));//对边传感器2
    sensorList.append(makeASensorItem(DSS6_ADDR_03B9, 6, tr("Opposite limit +")));//对边正限位
    sensorList.append(makeASensorItem(DSS6_ADDR_03B9, 7, tr("Opposite limit -")));//对边负限位

    sensorList.append(makeASensorItem(DSS6_ADDR_03BA, 0, tr("Receiving alarm status")));//收料报警状态
    sensorList.append(makeASensorItem(DSS6_ADDR_03BA, 1, tr("Automatic status of material receiving hand")));//收料手自动状态


    //将机型所需的传感器列表替换到传感器整体列表中
    for(int i = 0; i < sensorList.size(); i++)
    {
        int byteaddr = sensorList[i].m_byte_offset;
        int bitaddr = sensorList[i].m_bit_offset;
        QString str = sensorList[i].m_name;
        int type = sensorList[i].m_type;

        int idx = byteaddr*8+bitaddr;
        if(idx < m_allSensorList.size())
        {
            m_allSensorList[idx].m_name = str;
            m_allSensorList[idx].m_type = type;
        }
    }
}


//平板切割机报警
#define	STA_MTZ_SUCCESS			0x0101		// 归零成功
#define	STA_NORMAL_STOP			0x0100		// 正常停止

//飞行切割
#define	ERR_FEED_MANUAL			0x0027		// 进料处于手动状态
#define	ERR_MC_MANUAL			0x0028		// 机器处于手动状态
#define	ERR_KEY_SW_OFF			0x0029		// 机器钥匙开关关闭
#define	ERR_ALM_WATERTANK		0x002A		// 水箱报警
#define	ERR_ALM_COVEROPEN		0x002B		// 开盖报警
#define	ERR_LIGHTCURTAINS1		0x002C		// 光幕1介入
#define	ERR_LIGHTCURTAINS2		0x002D		// 光幕2介入
#define	ERR_AIR_POWER			0x002E		// 气压不足
#define	ERR_PRESS_SENSOR		0x002F		// 压料传感器错误
#define	ERR_CLIP_SENSOR			0x0030		// 夹布传感器错误
#define	ERR_NO_MATERIEL			0x0031		// 缺料报警
#define	ERR_CUTFRAME			0x0032		// 边框切割错误
#define	ERR_MC_AUTO				0x0033		// 机器处于自动状态
#define	ERR_DOOR_TIMEOUT		0x0034		// 开关门超时
#define	ERR_NOT_AT_OFFSET		0x0035		// 不在偏移点
#define	ERR_NO_PHOTO_FILE		0x0036		// 没有拍照文件
#define	ERR_FEED_AUTO			0x0037		// 进料处于自动状态
#define	ERR_GANTRY_NOT_POS		0x0038		// 龙门不到位
#define	ERR_GUARDRAIL_OPEN		0x0039		// 安全门未关闭

void FlyFlatCutting::initErrorCodeAndStateList()
{
    m_allErrorCodeAndStateList.clear();

    m_allErrorCodeAndStateList.append(makeAErrorStateItem(ERR_NOT_SAFE,tr("freedom from error")));               // 安全区域介入
    m_allErrorCodeAndStateList.append(makeAErrorStateItem(ERR_AIR_POWER,tr("Not powered on")));       // 气压不足
    m_allErrorCodeAndStateList.append(makeAErrorStateItem(ERR_COOR_SYSTM,tr("Coordinate system error")));         // 坐标系统错误
    m_allErrorCodeAndStateList.append(makeAErrorStateItem(ERR_OUT_RANGE,tr("Target position out of bounds")));       // 目标位置越界
    m_allErrorCodeAndStateList.append(makeAErrorStateItem(ERR_X_LIT_POSI,tr("X positive limit")));       // X正向限位
    m_allErrorCodeAndStateList.append(makeAErrorStateItem(ERR_X_LIT_NEGA,tr("X reverse limit")));       // X反向限位
    m_allErrorCodeAndStateList.append(makeAErrorStateItem(ERR_Y_LIT_POSI,tr("Y positive limit")));       // Y正向限位
    m_allErrorCodeAndStateList.append(makeAErrorStateItem(ERR_Y_LIT_NEGA,tr("Y reverse limit")));       // Y反向限位
    m_allErrorCodeAndStateList.append(makeAErrorStateItem(ERR_LIFT_COOR_SYSTM,tr("Error in the coordinate system of the lifting motor")));       // 升降电机坐标系统错误
    m_allErrorCodeAndStateList.append(makeAErrorStateItem(STA_MTZ_SUCCESS,tr("Zero successfully")));       // 归零成功
    m_allErrorCodeAndStateList.append(makeAErrorStateItem(STA_NORMAL_STOP,tr("Normal stop")));       // 正常停止
    m_allErrorCodeAndStateList.append(makeAErrorStateItem(ERR_EXPIRATION,tr("The usage deadline has expired")));       // 使用时限已到
    m_allErrorCodeAndStateList.append(makeAErrorStateItem(ERR_NOT_ALLOWED,tr("Work status not allowed")));       // 不允许工作状态

    m_allErrorCodeAndStateList.append(makeAErrorStateItem(ERR_FEED_MANUAL,tr("Feed in manual mode")));       // 进料处于手动状态
    m_allErrorCodeAndStateList.append(makeAErrorStateItem(ERR_MC_MANUAL,tr("The machine is in manual mode")));       // 机器处于手动状态
    m_allErrorCodeAndStateList.append(makeAErrorStateItem(ERR_KEY_SW_OFF,tr("Machine key switch off")));       // 机器钥匙开关关闭
    m_allErrorCodeAndStateList.append(makeAErrorStateItem(ERR_ALM_WATERTANK,tr("Water tank alarm")));       // 水箱报警
    m_allErrorCodeAndStateList.append(makeAErrorStateItem(ERR_ALM_COVEROPEN,tr("Cover opening alarm")));       // 开盖报警
    m_allErrorCodeAndStateList.append(makeAErrorStateItem(ERR_LIGHTCURTAINS1,tr("Light curtain 1 intervention")));       // 光幕1介入
    m_allErrorCodeAndStateList.append(makeAErrorStateItem(ERR_LIGHTCURTAINS2,tr("Light curtain 2 intervention")));       // 光幕2介入

    m_allErrorCodeAndStateList.append(makeAErrorStateItem(ERR_PRESS_SENSOR,tr("Pressure sensor error")));       // 压料传感器错误
    m_allErrorCodeAndStateList.append(makeAErrorStateItem(ERR_CLIP_SENSOR,tr("Cloth clip sensor error")));       // 夹布传感器错误
    m_allErrorCodeAndStateList.append(makeAErrorStateItem(ERR_NO_MATERIEL,tr("Shortage alarm")));       // 缺料报警
    m_allErrorCodeAndStateList.append(makeAErrorStateItem(ERR_CUTFRAME,tr("Border cutting error")));       // 边框切割错误
    m_allErrorCodeAndStateList.append(makeAErrorStateItem(ERR_MC_AUTO,tr("The machine is in automatic mode")));       // 机器处于自动状态
    m_allErrorCodeAndStateList.append(makeAErrorStateItem(ERR_DOOR_TIMEOUT,tr("Opening and closing door timeout")));       // 开关门超时
    m_allErrorCodeAndStateList.append(makeAErrorStateItem(ERR_NOT_AT_OFFSET,tr("Not at offset point")));       // 不在偏移点
    m_allErrorCodeAndStateList.append(makeAErrorStateItem(ERR_NO_PHOTO_FILE,tr("No photo files available")));       // 没有拍照文件
    m_allErrorCodeAndStateList.append(makeAErrorStateItem(ERR_FEED_AUTO,tr("Feed in automatic mode")));       // 进料处于自动状态
    m_allErrorCodeAndStateList.append(makeAErrorStateItem(ERR_GANTRY_NOT_POS,tr("The gantry is not in place")));       // 龙门不到位
    m_allErrorCodeAndStateList.append(makeAErrorStateItem(ERR_GUARDRAIL_OPEN,tr("The safety door is not closed")));       // 安全门未关闭

    m_allErrorCodeAndStateList.append(makeAErrorStateItem(ERR_NO_DATA,tr("No data available")));       // 无数据
    m_allErrorCodeAndStateList.append(makeAErrorStateItem(ERR_DATA_ERROR,tr("data error")));       // 数据错误
    m_allErrorCodeAndStateList.append(makeAErrorStateItem(ERR_GRAPH_OUT_RANGE,tr("Shape out of range")));       // 图形超出范围
    m_allErrorCodeAndStateList.append(makeAErrorStateItem(ERR_MC_PARA,tr("Machine parameter error")));       // 机器参数错误
    m_allErrorCodeAndStateList.append(makeAErrorStateItem(ERR_RUN_LIMIT,tr("Sports limit")));       // 运动限位
    m_allErrorCodeAndStateList.append(makeAErrorStateItem(ERR_LIFT_OUT_RANGE,tr("Head lifting position out of range")));       // 机头升降位置越界
    m_allErrorCodeAndStateList.append(makeAErrorStateItem(ERR_YZR_NOT_SYNC,tr("Y-direction motor not synchronized")));       // Y向电机不同步
    m_allErrorCodeAndStateList.append(makeAErrorStateItem(ERR_INSTALLMENT_OK,tr("Password set successfully")));       // 密码设置成功

}
